<script type="text/javascript">
 <!--
 function loadXMLDoc(dname) 
{
 try //Internet Explorer
 {
 xmlDoc=new ActiveXObject("MSXML2.DOMDOCument");
 //xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
 }
 catch(e)
 {
 try //Firefox, Mozilla, Opera, etc.
 {
 xmlDoc=document.implementation.createDocument("","",null);
 }
 catch(e){alert(e.message)}
 }
 try 
{
 xmlDoc.async=false;
 xmlDoc.load(dname);
 xmlDoc.save("books.xml");
 return(xmlDoc);
 }
 catch(e) {alert(e.message)}
 return(null);
 }
 
function write()
 {
 alert("Writing Start");
 xmlDoc=loadXMLDoc("books.xml");
 alert("Loaded");
 x=xmlDoc.getElementsByTagName("title")[0].childNodes[0];
 alert("Object")
 alert(x.nodeValue)
 x.nodeValue="Easy Cooking";
 alert(x.nodeValue)
 xmlDoc.save("books.xml");
 //alert("Saved");
 }
 
function cmdOk_onclick() {
 write()
 }